Optimal. Leaf size=69 \[ \frac {2 b^2 n^2 (f x)^m}{f m^3}-\frac {2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2342, 2341}
\begin {gather*} -\frac {2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}+\frac {2 b^2 n^2 (f x)^m}{f m^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2341
Rule 2342
Rubi steps
\begin {align*} \int (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}-\frac {(2 b n) \int (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right ) \, dx}{m}\\ &=\frac {2 b^2 n^2 (f x)^m}{f m^3}-\frac {2 b n (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m^2}+\frac {(f x)^m \left (a+b \log \left (c x^n\right )\right )^2}{f m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 67, normalized size = 0.97 \begin {gather*} \frac {(f x)^m \left (a^2 m^2-2 a b m n+2 b^2 n^2+2 b m (a m-b n) \log \left (c x^n\right )+b^2 m^2 \log ^2\left (c x^n\right )\right )}{f m^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.09, size = 1008, normalized size = 14.61
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1008\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 117, normalized size = 1.70 \begin {gather*} -2 \, {\left (\frac {f^{m - 1} n x^{m} \log \left (c x^{n}\right )}{m^{2}} - \frac {f^{m - 1} n^{2} x^{m}}{m^{3}}\right )} b^{2} - \frac {2 \, a b f^{m - 1} n x^{m}}{m^{2}} + \frac {\left (f x\right )^{m} b^{2} \log \left (c x^{n}\right )^{2}}{f m} + \frac {2 \, \left (f x\right )^{m} a b \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a^{2}}{f m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 124, normalized size = 1.80 \begin {gather*} \frac {{\left (b^{2} m^{2} n^{2} x \log \left (x\right )^{2} + b^{2} m^{2} x \log \left (c\right )^{2} + 2 \, {\left (a b m^{2} - b^{2} m n\right )} x \log \left (c\right ) + {\left (a^{2} m^{2} - 2 \, a b m n + 2 \, b^{2} n^{2}\right )} x + 2 \, {\left (b^{2} m^{2} n x \log \left (c\right ) + {\left (a b m^{2} n - b^{2} m n^{2}\right )} x\right )} \log \left (x\right )\right )} e^{\left ({\left (m - 1\right )} \log \left (f\right ) + {\left (m - 1\right )} \log \left (x\right )\right )}}{m^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 311 vs.
\(2 (63) = 126\).
time = 16.34, size = 311, normalized size = 4.51 \begin {gather*} \begin {cases} \tilde {\infty } \left (a^{2} x - 2 a b n x + 2 a b x \log {\left (c x^{n} \right )} + 2 b^{2} n^{2} x - 2 b^{2} n x \log {\left (c x^{n} \right )} + b^{2} x \log {\left (c x^{n} \right )}^{2}\right ) & \text {for}\: f = 0 \wedge m = 0 \\0^{m - 1} \left (a^{2} x - 2 a b n x + 2 a b x \log {\left (c x^{n} \right )} + 2 b^{2} n^{2} x - 2 b^{2} n x \log {\left (c x^{n} \right )} + b^{2} x \log {\left (c x^{n} \right )}^{2}\right ) & \text {for}\: f = 0 \\\frac {\begin {cases} \frac {a^{2} \log {\left (c x^{n} \right )} + a b \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} \log {\left (c x^{n} \right )}^{3}}{3}}{n} & \text {for}\: n \neq 0 \\\left (a^{2} + 2 a b \log {\left (c \right )} + b^{2} \log {\left (c \right )}^{2}\right ) \log {\left (x \right )} & \text {otherwise} \end {cases}}{f} & \text {for}\: m = 0 \\\frac {a^{2} \left (f x\right )^{m}}{f m} + \frac {2 a b \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {2 a b n \left (f x\right )^{m}}{f m^{2}} + \frac {b^{2} \left (f x\right )^{m} \log {\left (c x^{n} \right )}^{2}}{f m} - \frac {2 b^{2} n \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m^{2}} + \frac {2 b^{2} n^{2} \left (f x\right )^{m}}{f m^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 198 vs.
\(2 (69) = 138\).
time = 4.79, size = 198, normalized size = 2.87 \begin {gather*} \frac {b^{2} f^{m} n^{2} x^{m} \log \left (x\right )^{2}}{f m} + \frac {2 \, b^{2} f^{m} n x^{m} \log \left (c\right ) \log \left (x\right )}{f m} + \frac {b^{2} f^{m} x^{m} \log \left (c\right )^{2}}{f m} + \frac {2 \, a b f^{m} n x^{m} \log \left (x\right )}{f m} - \frac {2 \, b^{2} f^{m} n^{2} x^{m} \log \left (x\right )}{f m^{2}} + \frac {2 \, a b f^{m} x^{m} \log \left (c\right )}{f m} - \frac {2 \, b^{2} f^{m} n x^{m} \log \left (c\right )}{f m^{2}} + \frac {a^{2} f^{m} x^{m}}{f m} - \frac {2 \, a b f^{m} n x^{m}}{f m^{2}} + \frac {2 \, b^{2} f^{m} n^{2} x^{m}}{f m^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (f\,x\right )}^{m-1}\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________